package com.wnxy.eleba.entity;

import java.util.Date;

public class Customer {
    /**
    * 编号
    */
    private Integer id;

    /**
    * 用户账号
    */
    private String username;

    /**
    * 密码
    */
    private String password;

    /**
    * 邮箱
    */
    private String mail;

    /**
    * 生日
    */
    private Date birthday;

    /**
    * 头像
    */
    private String avator;

    /**
    * 昵称
    */
    private String nickname;

    /**
    * 账号创建日期
    */
    private Date createtime;

    /**
    * 用户类别：0/普通用户；1/VIP
    */
    private Integer level;

    /**
    * VIP创建时间
    */
    private Date vipcreatetime;

    /**
    * VIP过期时间
    */
    private Date vippassedtime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAvator() {
        return avator;
    }

    public void setAvator(String avator) {
        this.avator = avator;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Date getVipcreatetime() {
        return vipcreatetime;
    }

    public void setVipcreatetime(Date vipcreatetime) {
        this.vipcreatetime = vipcreatetime;
    }

    public Date getVippassedtime() {
        return vippassedtime;
    }

    public void setVippassedtime(Date vippassedtime) {
        this.vippassedtime = vippassedtime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", mail=").append(mail);
        sb.append(", birthday=").append(birthday);
        sb.append(", avator=").append(avator);
        sb.append(", nickname=").append(nickname);
        sb.append(", createtime=").append(createtime);
        sb.append(", level=").append(level);
        sb.append(", vipcreatetime=").append(vipcreatetime);
        sb.append(", vippassedtime=").append(vippassedtime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getMail() == null ? other.getMail() == null : this.getMail().equals(other.getMail()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getAvator() == null ? other.getAvator() == null : this.getAvator().equals(other.getAvator()))
            && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getVipcreatetime() == null ? other.getVipcreatetime() == null : this.getVipcreatetime().equals(other.getVipcreatetime()))
            && (this.getVippassedtime() == null ? other.getVippassedtime() == null : this.getVippassedtime().equals(other.getVippassedtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getMail() == null) ? 0 : getMail().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getAvator() == null) ? 0 : getAvator().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getVipcreatetime() == null) ? 0 : getVipcreatetime().hashCode());
        result = prime * result + ((getVippassedtime() == null) ? 0 : getVippassedtime().hashCode());
        return result;
    }
}